Skip to content

Conversation

@yaauie
Copy link
Member

@yaauie yaauie commented Mar 10, 2023

Replaces hard-coded link text replacements for configuration file anchors with a function that accepts and propagates any link text for the supported anchors

.gsub("<<path,path>>", "{logstash-ref}/configuration-file-structure.html#path[path]")
.gsub("<<uri,uri>>", "{logstash-ref}/configuration-file-structure.html#uri[uri]")
.gsub("<<bytes,bytes>>", "{logstash-ref}/configuration-file-structure.html#bytes[bytes]")
content = fix_configuration_file_structure_links(content)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you find this more readable if you had an "intercept_anchors" helper that took the content, a list of anchors to intercept, and the page to re-route them to like:

      content = intercept_anchors(content, %w(string array number boolean hash password path uri bytes), "{logstash-ref}/configuration-file-structure.html")

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure we want to make deviating from the standard so easy. If we add a new input type, we should vet it and possibly update the lists of inputs.

logstash-plugins/logstash-filter-elasticsearch#166 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants